
import {useUserStore} from "@/stores/user";
import Footer from '../components/Footer.vue';
import {useRoute, useRouter} from "vue-router";
import {useBusinessStore} from "@/stores/business";
import {useItemStore} from "@/stores/item";
import {useCartStore} from "@/stores/cart";
import {useAddressStore} from "@/stores/address";
import {usegetGaoDeAddress} from "@/stores/getGaoDeAddress";
import {useOrderStore} from "@/stores/orders";

// 常用于setup中获取router,store等，省去频繁的import和各use函数调用
export function useCommon() {
    const router = useRouter();
    const route = useRoute();
    const userStore=useUserStore();
    const businessStore=useBusinessStore();
    const itemStore=useItemStore();
    const cartStore=useCartStore();
    const addressStore=useAddressStore();
    const gaoDeAddress=usegetGaoDeAddress();
    const ordersStore=useOrderStore();
    return {
        Footer: Footer,
        ordersStore,
        gaoDeAddress,
        addressStore,
        cartStore,
        businessStore,
        userStore,
        itemStore,
        router,
        route,
    };
}
